﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MontagsmalerApp.Views
{
	/// <summary>
	/// Interaktionslogik für TeamAddPointsWindow.xaml
	/// </summary>
	public partial class TeamAddPointsWindow : Window
	{
		Spielerteam Team;

		public TeamAddPointsWindow(Spielerteam team)
		{
			InitializeComponent();
			textBlock1.Text = team.ToString();
			Team = team;
		}

		private void button1_Click(object sender, RoutedEventArgs e)
		{
			int eingegebenePunkte = 0;
			if (int.TryParse(textBox1.Text, out eingegebenePunkte))
			{
				Team.AddierePunkte(eingegebenePunkte);
				Close();
			}
		}
	}
}
